home *** CD-ROM | disk | FTP | other *** search
/ CD School House 9 / CD School House 9.0 - Wayzata Technology (1994).iso / pc / games / mac / __the_arcade__ / sea_hunt / card_3289.txt < prev    next >
Text File  |  1990-09-08  |  13KB  |  653 lines

  1. -- card: 3289 from stack: in
  2. -- bmap block id: 4621
  3. -- flags: 0000
  4. -- background id: 2774
  5. -- name: player board
  6. ----- HyperTalk script -----
  7. --
  8. --
  9. --   This stack and it's scripts and graphics are copyright 1989,
  10. --   Prophecy Software Inc.  All rights reserved.
  11. --
  12. --   You may examine this code for your own benifit.
  13. --   If you wish to make changes that enhance the stack please make
  14. --   them to a copy and contact us at:
  15. --
  16. --   Prophecy Software Inc.
  17. --   3650 Silverside Rd. Suite 3
  18. --   Wilmington, DE 19810
  19. --   (302) 994-1502
  20. --
  21. --   We will be happy to consider distributing an updated version with
  22. --   propper credit given to the author.  distribution of copies of this
  23. --   stack with un-authorized alterations constitures copyright
  24. --   violation and fraud.
  25.  
  26. on opencard
  27.   global letter, length
  28.   global is_horizontal
  29.  
  30.   set hilite of button horizontal to true
  31.   set hilite of button vertical to false
  32.  
  33.   hide card field 1
  34.   put true into is_horizontal
  35.  
  36.   put "B" into letter
  37.   put 5 into length
  38.  
  39.   set hilite of button 4 to false
  40.   set hilite of button 5 to false
  41.   set hilite of button 6 to false
  42.   set hilite of button 2 to true
  43.   set hilite of button 3 to false
  44.  
  45. end opencard
  46.  
  47.  
  48.  
  49. -- part 44 (button)
  50. -- low flags: 00
  51. -- high flags: 0000
  52. -- rect: left=24 top=80 right=209 bottom=153
  53. -- title width / last selected line: 0
  54. -- icon id / first selected line: 0 / 0
  55. -- text alignment: 1
  56. -- font id: 0
  57. -- text size: 12
  58. -- style flags: 0
  59. -- line height: 16
  60. -- part name: 
  61. ----- HyperTalk script -----
  62. --
  63. --
  64. --   This stack and it's scripts and graphics are copyright 1989,
  65. --   Prophecy Software Inc.  All rights reserved.
  66. --
  67. --   You may examine this code for your own benifit.
  68. --   If you wish to make changes that enhance the stack please make
  69. --   them to a copy and contact us at:
  70. --
  71. --   Prophecy Software Inc.
  72. --   3650 Silverside Rd. Suite 3
  73. --   Wilmington, DE 19810
  74. --   (302) 994-1502
  75. --
  76. --   We will be happy to consider distributing an updated version with
  77. --   propper credit given to the author.  distribution of copies of this
  78. --   stack with un-authorized alterations constitures copyright
  79. --   violation and fraud.
  80.  
  81. on mouseUp
  82.   global letter, length, is_horizontal
  83.  
  84.   put the mouseh - the left of target into delta_h
  85.   put the mousev - the top of target into delta_v
  86.   put round(delta_h /  16 + .5) into delta_h
  87.   put round(delta_v / 16 + .5) into delta_v
  88.  
  89.   put (delta_v -1) * 8 + delta_h into the_field
  90.  
  91.   put field the_field into save_field
  92.   put "  " into field the_field
  93.   select line 1 of field the_field
  94.  
  95.   if is_horizontal is true then
  96.     if delta_h + length - 1 > 8 then
  97.       answer "Boat will not fit there"
  98.       put save_field into field the_field
  99.       exit mouseup
  100.     end if
  101.   else
  102.     if delta_v + length - 1 > 8 then
  103.       answer "Boat will not fit there"
  104.       put save_field into field the_field
  105.       exit mouseup
  106.  
  107.     end if
  108.   end if
  109.  
  110.   put save_field into field the_field
  111.  
  112.   put the_field into temp_field
  113.   put 0 into count
  114.   repeat while count < length
  115.     add 1 to count
  116.     get field temp_field
  117.     if it is not "" and it is not letter then
  118.       answer "Boat will not fit there"
  119.       exit mouseup
  120.     end if
  121.  
  122.     if is_horizontal then
  123.       add 1 to temp_field
  124.     else
  125.       add 8 to temp_field
  126.     end if
  127.   end repeat
  128.  
  129.   put 1 into count
  130.   repeat while count <= length
  131.     get line count of card field letter
  132.     if it is not "" then
  133.       put "" into field it
  134.     end if
  135.  
  136.     add 1 to count
  137.   end repeat
  138.  
  139.   put the_field into temp_field
  140.   put 0 into count
  141.   repeat while count < length
  142.     add 1 to count
  143.  
  144.     put letter into field temp_field
  145.     put temp_field into line count of card field letter
  146.     if is_horizontal then
  147.       add 1 to temp_field
  148.     else
  149.       add 8 to temp_field
  150.     end if
  151.   end repeat
  152.  
  153. end mouseUp
  154.  
  155.  
  156.  
  157. -- part 45 (button)
  158. -- low flags: 00
  159. -- high flags: C006
  160. -- rect: left=256 top=48 right=65 bottom=417
  161. -- title width / last selected line: 0
  162. -- icon id / first selected line: 0 / 0
  163. -- text alignment: 1
  164. -- font id: 0
  165. -- text size: 12
  166. -- style flags: 0
  167. -- line height: 16
  168. -- part name: Battle Ship  (B)
  169. ----- HyperTalk script -----
  170. on mouseUp
  171.   global letter, length
  172.  
  173.   put "B" into letter
  174.   put 5 into length
  175.  
  176.   set hilite of button 4 to false
  177.   set hilite of button 5 to false
  178.   set hilite of button 6 to false
  179.   set hilite of button 2 to false
  180.   set hilite of button 3 to false
  181.   set hilite of target to true
  182. end mouseUp
  183.  
  184.  
  185.  
  186. -- part 47 (button)
  187. -- low flags: 00
  188. -- high flags: 8006
  189. -- rect: left=256 top=72 right=89 bottom=417
  190. -- title width / last selected line: 0
  191. -- icon id / first selected line: 0 / 0
  192. -- text alignment: 1
  193. -- font id: 0
  194. -- text size: 12
  195. -- style flags: 0
  196. -- line height: 16
  197. -- part name: Aircraft Carrier (C)
  198. ----- HyperTalk script -----
  199. on mouseUp
  200.   global letter, length
  201.  
  202.   put "C" into letter
  203.   put 4 into length
  204.  
  205.   set hilite of button 4 to false
  206.   set hilite of button 5 to false
  207.   set hilite of button 6 to false
  208.   set hilite of button 2 to false
  209.   set hilite of button 3 to false
  210.   set hilite of target to true
  211.  
  212. end mouseUp
  213.  
  214.  
  215.  
  216. -- part 48 (button)
  217. -- low flags: 00
  218. -- high flags: 8006
  219. -- rect: left=256 top=96 right=113 bottom=417
  220. -- title width / last selected line: 0
  221. -- icon id / first selected line: 0 / 0
  222. -- text alignment: 1
  223. -- font id: 0
  224. -- text size: 12
  225. -- style flags: 0
  226. -- line height: 16
  227. -- part name: Troop Transport (T)
  228. ----- HyperTalk script -----
  229. on mouseUp
  230.   global letter, length
  231.  
  232.   put "T" into letter
  233.   put 3 into length
  234.  
  235.   set hilite of button 4 to false
  236.   set hilite of button 5 to false
  237.   set hilite of button 6 to false
  238.   set hilite of button 2 to false
  239.   set hilite of button 3 to false
  240.   set hilite of target to true
  241.  
  242. end mouseUp
  243.  
  244.  
  245.  
  246. -- part 49 (button)
  247. -- low flags: 00
  248. -- high flags: 8006
  249. -- rect: left=256 top=120 right=137 bottom=418
  250. -- title width / last selected line: 0
  251. -- icon id / first selected line: 0 / 0
  252. -- text alignment: 1
  253. -- font id: 0
  254. -- text size: 12
  255. -- style flags: 0
  256. -- line height: 16
  257. -- part name: Submarine (S)
  258. ----- HyperTalk script -----
  259. on mouseUp
  260.   global letter, length
  261.  
  262.   put "S" into letter
  263.   put 3 into length
  264.  
  265.   set hilite of button 4 to false
  266.   set hilite of button 5 to false
  267.   set hilite of button 6 to false
  268.   set hilite of button 2 to false
  269.   set hilite of button 3 to false
  270.   set hilite of target to true
  271.  
  272. end mouseUp
  273.  
  274.  
  275.  
  276. -- part 50 (button)
  277. -- low flags: 00
  278. -- high flags: 8006
  279. -- rect: left=256 top=144 right=161 bottom=417
  280. -- title width / last selected line: 0
  281. -- icon id / first selected line: 0 / 0
  282. -- text alignment: 1
  283. -- font id: 0
  284. -- text size: 12
  285. -- style flags: 0
  286. -- line height: 16
  287. -- part name: PT Boat (P)
  288. ----- HyperTalk script -----
  289. on mouseUp
  290.   global letter, length
  291.  
  292.   put "P" into letter
  293.   put 2 into length
  294.  
  295.   set hilite of button 4 to false
  296.   set hilite of button 5 to false
  297.   set hilite of button 6 to false
  298.   set hilite of button 2 to false
  299.   set hilite of button 3 to false
  300.   set hilite of target to true
  301.  
  302. end mouseUp
  303.  
  304.  
  305.  
  306. -- part 51 (button)
  307. -- low flags: 00
  308. -- high flags: E006
  309. -- rect: left=224 top=184 right=201 bottom=321
  310. -- title width / last selected line: 0
  311. -- icon id / first selected line: 0 / 0
  312. -- text alignment: 1
  313. -- font id: 0
  314. -- text size: 12
  315. -- style flags: 0
  316. -- line height: 16
  317. -- part name: Horizontal
  318. ----- HyperTalk script -----
  319. on mouseUp
  320.   global is_horizontal
  321.   put true into is_horizontal
  322.   set hilite of target to true
  323.   set hilite of button vertical to false
  324. end mouseUp
  325.  
  326.  
  327.  
  328. -- part 52 (button)
  329. -- low flags: 00
  330. -- high flags: A006
  331. -- rect: left=352 top=184 right=201 bottom=448
  332. -- title width / last selected line: 0
  333. -- icon id / first selected line: 0 / 0
  334. -- text alignment: 1
  335. -- font id: 0
  336. -- text size: 12
  337. -- style flags: 0
  338. -- line height: 16
  339. -- part name: Vertical
  340. ----- HyperTalk script -----
  341. on mouseUp
  342.   global is_horizontal
  343.   put false into is_horizontal
  344.   set hilite of target to true
  345.   set hilite of button horizontal to false
  346. end mouseUp
  347.  
  348.  
  349.  
  350. -- part 55 (button)
  351. -- low flags: 00
  352. -- high flags: A003
  353. -- rect: left=27 top=221 right=246 bottom=150
  354. -- title width / last selected line: 0
  355. -- icon id / first selected line: 0 / 0
  356. -- text alignment: 1
  357. -- font id: 0
  358. -- text size: 12
  359. -- style flags: 0
  360. -- line height: 16
  361. -- part name: Done
  362. ----- HyperTalk script -----
  363. on mouseUp
  364.   global last_message, ship_ok, whom
  365.  
  366.   show card field "checking"
  367.   put 1 into count
  368.   put 0 into num_ships
  369.   repeat while count < 65
  370.  
  371.     if field count is not "" then add 1 to num_ships
  372.     add 1 to count
  373.   end repeat
  374.  
  375.   hide card field "checking"
  376.   if num_ships is not 17 then
  377.     answer "Sorry, you are not ready yet."
  378.     exit mouseup
  379.   end if
  380.  
  381.   visual effect scroll right
  382.   if whom is not empty then
  383.     get writemodem("done" && "ΓÇó")
  384.   end if
  385.  
  386.   put true into ship_ok
  387.  
  388.   put "done" into last_message
  389.   if whom is not empty then
  390.     send whom to card "start"
  391.   else
  392.     go to card start
  393.   end if
  394.  
  395. end mouseUp
  396.  
  397.  
  398.  
  399. -- part 56 (field)
  400. -- low flags: 81
  401. -- high flags: 0004
  402. -- rect: left=128 top=285 right=308 bottom=367
  403. -- title width / last selected line: 0
  404. -- icon id / first selected line: 0 / 0
  405. -- text alignment: 1
  406. -- font id: 3
  407. -- text size: 12
  408. -- style flags: 256
  409. -- line height: 16
  410. -- part name: 
  411.  
  412.  
  413. -- part 58 (button)
  414. -- low flags: 00
  415. -- high flags: A003
  416. -- rect: left=27 top=249 right=275 bottom=150
  417. -- title width / last selected line: 0
  418. -- icon id / first selected line: 0 / 0
  419. -- text alignment: 1
  420. -- font id: 0
  421. -- text size: 12
  422. -- style flags: 0
  423. -- line height: 16
  424. -- part name: Clear
  425. ----- HyperTalk script -----
  426. on mouseUp
  427.   put 0 into count
  428.   repeat while count < 64
  429.     add 1 to count
  430.     put "" into field count
  431.   end repeat
  432.  
  433.   put "" into card field "B"
  434.   put "" into card field "C"
  435.   put "" into card field "T"
  436.   put "" into card field "S"
  437.   put "" into card field "P"
  438.  
  439. end mouseUp
  440.  
  441.  
  442.  
  443. -- part 59 (field)
  444. -- low flags: 80
  445. -- high flags: 4002
  446. -- rect: left=169 top=201 right=283 bottom=198
  447. -- title width / last selected line: 0
  448. -- icon id / first selected line: 0 / 0
  449. -- text alignment: 0
  450. -- font id: 3
  451. -- text size: 12
  452. -- style flags: 0
  453. -- line height: 16
  454. -- part name: B
  455.  
  456.  
  457. -- part 60 (field)
  458. -- low flags: 80
  459. -- high flags: 4002
  460. -- rect: left=204 top=201 right=270 bottom=232
  461. -- title width / last selected line: 0
  462. -- icon id / first selected line: 0 / 0
  463. -- text alignment: 0
  464. -- font id: 3
  465. -- text size: 12
  466. -- style flags: 0
  467. -- line height: 16
  468. -- part name: C
  469.  
  470.  
  471. -- part 61 (field)
  472. -- low flags: 80
  473. -- high flags: 4002
  474. -- rect: left=240 top=201 right=253 bottom=269
  475. -- title width / last selected line: 0
  476. -- icon id / first selected line: 0 / 0
  477. -- text alignment: 0
  478. -- font id: 3
  479. -- text size: 12
  480. -- style flags: 0
  481. -- line height: 16
  482. -- part name: T
  483.  
  484.  
  485. -- part 62 (field)
  486. -- low flags: 80
  487. -- high flags: 4002
  488. -- rect: left=275 top=201 right=252 bottom=304
  489. -- title width / last selected line: 0
  490. -- icon id / first selected line: 0 / 0
  491. -- text alignment: 0
  492. -- font id: 3
  493. -- text size: 12
  494. -- style flags: 0
  495. -- line height: 16
  496. -- part name: S
  497.  
  498.  
  499. -- part 63 (field)
  500. -- low flags: 80
  501. -- high flags: 4002
  502. -- rect: left=312 top=201 right=236 bottom=341
  503. -- title width / last selected line: 0
  504. -- icon id / first selected line: 0 / 0
  505. -- text alignment: 0
  506. -- font id: 3
  507. -- text size: 12
  508. -- style flags: 0
  509. -- line height: 16
  510. -- part name: p
  511.  
  512.  
  513. -- part 65 (field)
  514. -- low flags: 81
  515. -- high flags: 0004
  516. -- rect: left=10 top=126 right=158 bottom=180
  517. -- title width / last selected line: 0
  518. -- icon id / first selected line: 0 / 0
  519. -- text alignment: 1
  520. -- font id: 3
  521. -- text size: 18
  522. -- style flags: 256
  523. -- line height: 24
  524. -- part name: Checking
  525.  
  526.  
  527. -- part 67 (button)
  528. -- low flags: 00
  529. -- high flags: 2000
  530. -- rect: left=184 top=33 right=66 bottom=226
  531. -- title width / last selected line: 0
  532. -- icon id / first selected line: 2507 / 2507
  533. -- text alignment: 1
  534. -- font id: 0
  535. -- text size: 12
  536. -- style flags: 0
  537. -- line height: 16
  538. -- part name: 
  539. ----- HyperTalk script -----
  540. on mouseUp
  541.   visual effect barn door open
  542.   go to next card
  543. end mouseUp
  544.  
  545.  
  546.  
  547. -- part contents for card part 56
  548. ----- text -----
  549. Opponent is Ready
  550.  
  551. -- part contents for card part 65
  552. ----- text -----
  553. Checking
  554.  
  555. -- part contents for card part 62
  556. ----- text -----
  557. 13
  558. 14
  559. 15
  560.  
  561. -- part contents for card part 63
  562. ----- text -----
  563. 51
  564. 59
  565.  
  566. -- part contents for card part 61
  567. ----- text -----
  568. 61
  569. 62
  570. 63
  571.  
  572. -- part contents for card part 59
  573. ----- text -----
  574. 17
  575. 25
  576. 33
  577. 41
  578. 49
  579.  
  580. -- part contents for card part 60
  581. ----- text -----
  582. 36
  583. 37
  584. 38
  585. 39
  586.  
  587. -- part contents for background part 14
  588. ----- text -----
  589. S
  590.  
  591. -- part contents for background part 15
  592. ----- text -----
  593. S
  594.  
  595. -- part contents for background part 16
  596. ----- text -----
  597. S
  598.  
  599. -- part contents for background part 18
  600. ----- text -----
  601. B
  602.  
  603. -- part contents for background part 26
  604. ----- text -----
  605. B
  606.  
  607. -- part contents for background part 34
  608. ----- text -----
  609. B
  610.  
  611. -- part contents for background part 42
  612. ----- text -----
  613. B
  614.  
  615. -- part contents for background part 50
  616. ----- text -----
  617. B
  618.  
  619. -- part contents for background part 37
  620. ----- text -----
  621. C
  622.  
  623. -- part contents for background part 38
  624. ----- text -----
  625. C
  626.  
  627. -- part contents for background part 39
  628. ----- text -----
  629. C
  630.  
  631. -- part contents for background part 40
  632. ----- text -----
  633. C
  634.  
  635. -- part contents for background part 62
  636. ----- text -----
  637. T
  638.  
  639. -- part contents for background part 63
  640. ----- text -----
  641. T
  642.  
  643. -- part contents for background part 64
  644. ----- text -----
  645. T
  646.  
  647. -- part contents for background part 52
  648. ----- text -----
  649. P
  650.  
  651. -- part contents for background part 60
  652. ----- text -----
  653. P